package com.rc.saas.mini.mapper.order;

import com.rc.saas.mini.common.base.BaseMapper;
import com.rc.saas.mini.model.enterprise.EnterpriseMember;
import com.rc.saas.mini.model.member.MemberInfo;
import com.rc.saas.mini.model.order.OrderInfo;
import com.rc.saas.mini.model.order.OrderInfoExample;
import com.rc.saas.mini.vo.invoice.ElecInvoiceVo;
import com.rc.saas.mini.vo.order.OrderStatisticsVo;
import com.rc.saas.mini.vo.order.OrderInfoVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderInfoMapper extends BaseMapper<Long, OrderInfo, OrderInfoExample> {
    OrderStatisticsVo countOrderByYearMonth(@Param("memberId") Long memberId, @Param("yearMonth") String yearMonth);

    List<OrderInfoVo> listOrderByYearMonth(@Param("memberId") Long memberId, @Param("yearMonth") String yearMonth, @Param("accountType") String accountType, @Param("carNumList") List<String> carNumList, @Param("status") String status);

    List<String> listYearMonthByMemberId(@Param("memberId") Long memberId, @Param("accountType") String accountType, @Param("carNumList") List<String> carNumList, @Param("status") String status);

    List<OrderInfo> listOrder(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("carNum") String carNum, @Param("memberIdList") List<Long> memberIdList);

    OrderInfo selectByPileIdAndGunId(@Param("pileId") Long pileId, @Param("elecGunId") Long elecGunId);

    OrderInfoVo selectOrderById(Long orderId);

    List<OrderInfoVo> listOrderWithoutInvoice(Long memberId);

    ElecInvoiceVo countInvoiceByOrder(@Param("selfOrderIds") List<Long> selfOrderIds, @Param("tenantCode") String tenantCode);

    OrderInfo selectNewOrderByMemberId(@Param("memberId") Long memberId);

    List<String> listEntOrdertDateRecord(@Param("memberInfo") MemberInfo memberInfo, @Param("enterpriseMember") EnterpriseMember enterpriseMember);

    List<OrderInfoVo> listEntOrderWithoutInvoiceByMember(@Param("tenantCode") String tenantCode, @Param("memberId") Long memberId, @Param("enterpriseId") Long enterpriseId, @Param("yearMonth") String yearMonth);

    List<String> listOrderDateWithInvoice(@Param("invoiceApplyId") Long invoiceApplyId);

    List<OrderInfoVo> listOrderWithInvoice(@Param("invoiceApplyId") Long invoiceApplyId, @Param("yearMonth") String yearMonth);

    List<OrderInfoVo> listPageByRcEvaluateWithOrder(@Param("memberId") Long memberId);

    List<OrderInfoVo> listByRcWithEvaluateVo(@Param("memberId") Long memberId);

    OrderInfo selectByNotEnd(@Param("memberId")Long memberId);

    List<OrderInfo> listByInvoice(@Param("ids")List<Long> ids, @Param("memberId")Long memberId);

    List<OrderInfo> listFinishOrder(@Param("memberId")Long memberId);
}